---
id: messagecenter
title: 9. MessageCenter 静态类
sidebar_label: 9. MessageCenter 静态类
---

## 9.1 订阅消息

```cs
MessageCenter.Subscribe<T>("messageId", (i,p) => {

});
```

## 9.2 发送消息

```cs
MessageCenter.Send("messageId", new {});
```

## 9.3 取消订阅

```cs
MessageCenter.Unsubscribe("messageId");
```
